home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
usr
/
sbin
/
select-default-ispell
< prev
next >
Wrap
Text File
|
2008-06-04
|
2KB
|
97 lines
#!/usr/bin/perl -w
use Debian::DictionariesCommon q(:all);
use Debconf::Client::ConfModule q(:all);
use Getopt::Long;
dico_checkroot ();
my $rebuild = '';
GetOptions ('rebuild' => \$rebuild);
version ('2.0');
my $class = "ispell";
my $question = "dictionaries-common/default-$class";
my $script = "/usr/share/dictionaries-common/dc-debconf-select.pl";
my $options = "";
$options = "--rebuild" if $rebuild;
sub dico_force_question (){
# Force asking question for given \%languages, or for all if not given
my $class = shift;
my $languages = shift;
my $question = "dictionaries-common/default-$class";
my %title = ('ispell' => "Dictionaries-common: Ispell dictionary",
'wordlist' => "Dictionaries-common: Wordlist dictionary"
);
# If no explict $languages is given, ask for all, and return if none present
$languages = &dico_parse_languages($class,"languages") unless $languages;
return unless %$languages;
my ($choices, $echoices ) = &dico_get_all_choices($class,$languages);
fset ($question, "seen", "false");
subst ($question, "choices", $choices);
subst ($question, "echoices", $echoices);
input ("critical", $question);
title ($title{$class});
go ();
}
updatedb ($class);
my $dictionaries = loaddb ($class);
if ( %$dictionaries ) {
if (get $question) {
require $script;
&dico_force_question($class);
}
}
system "update-default-$class $options";
# Local Variables:
# perl-indent-level: 2
# End:
__END__
=head1 NAME
select-default-ispell - select default ispell dictionary
=head1 SYNOPSIS
select-default-ispell [--rebuild]
=head1 DESCRIPTION
This program will make debconf always ask the shared question about
the default ispell dictionary to be used in your
system according to the installed ones, and will do the appropriate
settings.
Calls internally B<update-default-ispell>.
=head1 OPTIONS
--rebuild Rebuild emacsen and jed stuff
=head1 SEE ALSO
The dictionaries-common policy document
=head1 AUTHORS
Rafael Laboissiere
=cut
# LocalWords: ispell wordlist